home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / hp42s.src < prev    next >
Text File  |  1990-10-17  |  2KB  |  40 lines

  1. %%HP: T(3)A(D)F(.);
  2. @ by Joseph K. Horn
  3. DIR
  4.   TR42   @ Translates 42 INPRT'ed program into ->41'able form.
  5.     \<< DUP "}" POS 2 + MAXR SUB    @ remove line 00
  6.       1 TAB42 SIZE                 @ loop through 42 lookup table
  7.       FOR n 'TAB42' n GET         @ fetch next command pair
  8.         EVAL REPLACE             @ global search & replace
  9.       NEXT                      @ leave translated string on stack.
  10.     \>>
  11.   TAB42 {              @ lookup table of { 42 41 } commands
  12. { "+/-" "CHS" }        @ change sign
  13. { "\->DEC" "DEC" }     @ octal to decimal
  14. { "\->RAD" "D-R" }     @ degrees to radians
  15. { "ENTER" "ENTER\|^" } @ add up-arrow to ENTER
  16. { "N!" "FACT" }        @ factorial
  17. { "FP" "FRC" }         @ fractional part
  18. { "\->HMS" "HMS" }     @ decimal hours to H.MMSS
  19. { "\->HR" "HR" }       @ H.MMSS to decimal hours
  20. { " IP" " INT" }       @ integer part (leading space for AIP)
  21. { "\->OCT" "OCT" }     @ decimal to octal
  22. { "\->REC" "P-R" }     @ polar to rectangular
  23. { "Rv" "RDN" }         @ roll down
  24. { "\->DEG" "R-D" }     @ radians to degrees
  25. { "\->POL" "R-P" }     @ rectangular to polar
  26. { "STO+" "ST+" }       @\
  27. { "STO-" "ST-" }       @ \ storage
  28. { "STO\.x" "ST*" }     @ / arithmetic
  29. { "STO\:-" "ST/" }     @/
  30. { "X\<=0?" "X<=0?" }   @\ special "<=" sign
  31. { "X\<=Y?" "X<=Y?" }   @/
  32. { "\.x" "*" }          @ multiply
  33. { "\:-" "/" }          @ divide
  34. { " ST " " " }         @ stack register
  35. { "\004" "\010" }      @ printer newlines -> real newlines
  36. { C$ 1 " "'" }         @ double-quotes -> single-quotes
  37. { "\|>" " " }          @ delete LBL blobs
  38.    }
  39. END
  40.